/*
 * @Description:
 * @Version: 0.0.1
 * @Autor: zhj1214
 * @Date: 2021-12-15 16:24:56
 * @LastEditors: zhj1214
 * @LastEditTime: 2021-12-17 10:29:40
 */
import request from "@utils/http";

const api = {
  add: "/menu/add",
  update: "/menu/update",
  remove: "/menu/remove",
  info: "/menu/info",
  list: "/menu/list",
};

export default api;

export function addMenuInfo(parameter) {
  // return Promise.reject();
  return request({
    url: api.add,
    method: "post",
    data: parameter,
  });
}

export function updateMenuInfo(parameter) {
  // return Promise.reject();
  return request({
    url: api.update,
    method: "post",
    data: parameter,
  });
}

export function deleteMenu(parameter) {
  // return Promise.reject();
  return request({
    url: api.remove,
    method: "get",
    params: parameter,
  });
}

export function getMenuInfo(parameter) {
  return request({
    url: api.info,
    method: "get",
    params: parameter,
  });
}

export function getMenuList(parameter) {
  // return Promise.reject();
  return request({
    url: api.list,
    method: "get",
    params: parameter,
  });
}
